using System.Collections.Generic;
using System.Serialization;
using Minions.Classes;

namespace MinionsEdit.Classes
{
    public sealed class UndoItem
    {
        public string Buffer;

        public UndoItem(string buffer)
        {
            Buffer = buffer;
        }

        public static List<Minion> Parse(string content)
        {
            try
            {
                return (List<Minion>) Json.Parse(content);
            }
            catch
            {
                return null;
            }
        }
    }
}